package com.hundsun.fcp.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.hundsun.fcp.R;
import com.hundsun.fcp.bean.BankBean;

public class BankManagerAdapter extends Adapter<BankBean> {

	public BankManagerAdapter(Context context) {
		super(context, R.layout.activity_manager_banks_item);
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder holder = null ;
		if(convertView == null){
			holder = new ViewHolder() ;
			convertView = mInflater.inflate(mLayoutResId, null) ;
			holder.mBankIconIv = (ImageView) convertView.findViewById(R.id.im_bankIcon) ;
			holder.mBankNameTv = (TextView) convertView.findViewById(R.id.tv_bankName) ;
			holder.mBankNoTv = (TextView) convertView.findViewById(R.id.tv_bankNO) ;
			holder.mBankLimitDescTv = (TextView) convertView.findViewById(R.id.tv_bankLimitDesc) ;
			convertView.setTag(holder) ;
		}else{
			holder = (ViewHolder) convertView.getTag() ;
		}
		return convertView;
	}
	
	@Override
	public int getCount() {
		return 2;
	}
	
	class ViewHolder{
		ImageView mBankIconIv ;
		TextView mBankNameTv ;
		TextView mBankNoTv ;
		TextView mBankLimitDescTv ;
	}

}
